package com.self.study.subjectsstudy.db.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.self.study.subjectsstudy.db.bean.ErrorSubjects;
import com.self.study.subjectsstudy.db.bean.Subjects;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 我的错题
 Mapper 接口
 * </p>
 *
 * @author lixunhuan
 * @since 2021-03-08
 */
public interface ErrorSubjectsMapper extends BaseMapper<ErrorSubjects> {

    @Select("SELECT s.* FROM  error_subjects es LEFT JOIN subjects s on es.subject_id=s.id  where es.openid=#{openid}")
    List<Subjects> getMyErrorSubjects(@Param("openid") String openId);

}
